<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="js/vue.js"></script>
</head>
<body>

<div id="app">
  <!--点哪个div，哪个div就可以喊自己疼！-->
  <button id="d1" @click="say('html')">d1</button>
  <button id="d2" @click="say('css')">d2</button>
</div>

<script>
  new Vue({
    el:"#app",
    methods:{
      say(name){
        alert(`hello ${name}!`)
      }
    }
  })
  </script>

</body>
</html>
